package cn.ljlao.mall.product.goods.dao;

import cn.ljlao.mall.product.goods.entity.CategoryBrandRelationEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * 品牌分类关联
 * 
 * @author LiuZhen
 * @email ljlao@vip.qq.com
 * @date 2020-10-14 13:51:59
 */
@Mapper
public interface CategoryBrandRelationDao extends BaseMapper<CategoryBrandRelationEntity> {

    @Update("UPDATE pms_category_brand_relation SET catelog_name = #{name} where catelog_id = #{catId}")
    void updateByCategory(@Param("catId") Long catId, @Param("name")String name);


    List<CategoryBrandRelationEntity> selectAllByBrandId(@Param("brandId")Long brandId);



}
